﻿/*	Nonoba Multiplayer API Connection Wrapper class	Copyright (C)2008 Odpy ApS	Please do not modify this class*/package Nonoba.api{		import flash.events.EventDispatcher	import flash.events.Event	import Nonoba.api.ConnectionEvent	dynamic public class Connection extends EventDispatcher{		private var p:* = null		private var queue:Array = [];		function Connection(){			addEventListener(ConnectionEvent.INIT,emptyQueue)		}		public function Send(...args:*):void{			if(p != null && p.Initialized == true){				p.Send.apply(p, args);			}else queue.push(function(){Send.apply(this, args)})		}		public function emptyQueue(e:Event):void{			for( var i:int=0;i<queue.length;i++)				queue[i]();			queue = [];		}		public function get Initialized():Boolean{			return false		}		public function set proxy(p:*):void{			this.p = p;		}	}}